package org.example.service.impl;

import org.example.dao.UserMapper;
import org.example.dto.User;
import org.example.rvo.ResultVO;
import org.example.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    /**
     * 查询用户信息
     * @param id
     * @return
     * @throws Exception
     */
    @Override
    public ResultVO getUser(Integer id) throws Exception {
        User user = userMapper.queryUserById(id);
        return ResultVO.success("200","成功",user);
    }
}
